package com.design02_Structural.pattern12_flyweight.example02;

import org.junit.Test;

/**
 * 共享享元类-白色棋子
 * @author spikeCong
 * @date 2022/10/10
 **/
public class WhiteGobang extends GobangFlyweight{


    @Override
    public String getColor() {
        return "白色";
    }


    @Test
    public void test(){
        Integer i1 = 127;
        Integer i2 = 127;
        System.out.println("i1和i2对象是否是同一个对象？" +(i1 == i2));
        Integer i3 = -128;
        Integer i4 = -128;
        System.out.println("i3和i4对象是否是同一个对象？" +(i3 == i4));

    }


}